package Test_319_6;


public abstract class Student {

    //属性
    private String stuName;
    private String stuNum;
    private String stuSex;
    private int stuAge;
    private double midterms;//期中成绩
    private double finals;//期末成绩

    //行为

    /**
     * 计算综合成绩
     * @return 综合成绩
     *
     */

    public abstract Double CourseScore();

    /**
     * 打印学生的信息
     */

    public void printStuScore(){
        System.out.println("学号："+this.getStuNum()+";" +
                "姓名："+this.getStuName()+";性别："+this.getStuSex()+";年龄："+this.getStuAge()+
                ";综合成绩："+this.CourseScore());
    }

    //getter和setter


    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public String getStuNum() {
        return stuNum;
    }

    public void setStuNum(String stuNum) {
        this.stuNum = stuNum;
    }

    public String getStuSex() {
        return stuSex;
    }

    public void setStuSex(String stuSex) {
        this.stuSex = stuSex;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    public double getMidterms() {
        return midterms;
    }

    public void setMidterms(double midterms) {
        this.midterms = midterms;
    }

    public double getFinals() {
        return finals;
    }

    public void setFinals(double finals) {
        this.finals = finals;
    }
}
